package com.qk.common.util;

/**
 * @Author: ZgYn
 * @Date 2025/10/14 18:36
 * @name：CurrentUserContextHolders
 */
public class CurrentUserContextHolders {
    private CurrentUserContextHolders() {}

    private static final ThreadLocal<Integer>  USER_CONTEXT = new ThreadLocal<>();

    public static void set(Integer userId) {
        USER_CONTEXT.set(userId);
    }

    public static Integer get(){
        return USER_CONTEXT.get();
    }

    public static void remove(){
        USER_CONTEXT.remove();
    }
}
